- /* srofdvdb.cpp by K.Tsuru */
- // function ID = 825 BRADIX
- /*******************************
- SRational class
- (N/D)/d = N/(D*d)
- ********************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
- // m/d
- SRational operator/(const SRational& m, double d){
- if(d == 0.0) m.num.SetError(m.num.DIVIDED_BY_ZERO,"SR/double", 825);
- SRational r;
- if( !m.Sign(825) ) r.SetZero();
- else if(d == 1.0L) r = m;
- else if(d == -1.0L) r = -m;
- else r.Set(m.NumNR(), m.DenNR()*(SInteger)d); // includes r.reduce(false);
- return r;
- }
srofdvdb.cpp : last modifiled at 2016/06/26 16:29:28(541 bytes)
created at 2016/06/26 15:57:35
The creation time of this html file is 2016/09/18 20:28:05 (Sun Sep 18 20:28:05 2016).